home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
qlib205.zip
/
QLIB.ZIP
/
TXT
/
CALLBACK.TXT
next >
Wrap
Text File
|
1997-03-14
|
1KB
|
38 lines
CALL BACKs
----------
QLIB provides these servies for using callbacks:
alloc_callback(dword your_proc,dword call_back_struct,byte typ);
- this is used to alloc the callback
- your_proc should be the offset of your proc to call
- call_back_struct must be the offset of a callstruct<> that you must
have in your data segment (although DOS32 does not require this, DOS/4GW
and PMODE/W do so you must use one at all times)
- typ is the type of callback you wish to get:
CB_RETF = retf stack frame
CB_IRET = iret stack frame
- ax:dx is returned which is the (CS:IP) of the real mode callback
_iret(dword call_back_struct);
- this must be called at the end of your proc if you are using a
iret stack frame
- this function does not return (it ends your proc and passes control
back to real mode)
_retf(dword call_back_struct);
- this must be called at the end of your proc if you are using a
retf stack frame
- this function does not return (it ends your proc and passes control
back to real mode)
free_callback(_seg:word,_off:word)
- this frees a callback (_seg and _off are values you received from
alloc_callback() )
If you use the above then your code will always work. If you know you are
using a specfic DOS extender and will to use it's function directly you may,
but make sure to indicate this in your source code if you plan on releasing
the source.